<?php
/**
 * Api路由
 */

use think\facade\Route;

Route::group('api', function() {
    //MISS路由定义
    Route::miss('api/Miss/index');
    Route::rule(
        'Index', 'api/Index/index', 'get'
    );
    Route::rule(
        'UserLogin/userLogin', 'api/UserLogin/userLogin', 'get'
    );
    Route::rule(
        'User/getUserInfo', 'api/User/getUserInfo', 'get'
    );
    Route::rule(
        'User/getUserInfo', 'api/User/getUserInfo', 'get'
    );
    Route::rule(
        'Order/createOrder', 'api/Order/createOrder', 'get'
    );
    Route::rule(
        'SaveUser/getUserOpenid', 'api/SaveUser/getUserOpenid', 'get'
    );
})->middleware('ApiResponse');


Route::rule(
    'AdminLogin/adminLogin', 'mtadminapi/AdminLogin/adminLogin', 'post'     // 管理员登录
)->middleware('ApiResponse');
Route::group('adminapi', function() { // 商户后台管理
    //MISS路由定义
    Route::miss('api/Miss/index');
    Route::rule(
        'AdminLogin/adminAuth', 'mtadminapi/AdminLogin/adminAuth', 'get'        // 管理员权限
    );
    Route::rule(
        'AdminSysShopHandle/index', 'mtadminapi/AdminSysShopHandle/index', 'get'        //
    );
    Route::rule(
        'AdminSysOrder/queryOrder', 'mtadminapi/AdminSysOrder/queryOrder', 'get'        // 后台管理订单查询
    );
    Route::rule(
        'Base/authList', 'mtadminapi/Base/authList', 'get'      // 权限列表
    );
    Route::rule(
        'AdminSysShopHandle/storeMessageSet', 'mtadminapi/AdminSysShopHandle/storeMessageSet', 'post'       // 门店信息设置
    );
    Route::rule(
        'AdminSysShopHandle/shopLogoUpload', 'mtadminapi/AdminSysShopHandle/shopLogoUpload', 'post'       // 门店信息设置
    );
    Route::rule(
        'AdminSysRoomManage/roomAdd', 'mtadminapi/AdminSysRoomManage/roomAdd', 'post'       // 房屋添加
    );
    Route::rule(
        'AdminSysRoomManage/houseAsk', 'mtadminapi/AdminSysRoomManage/houseAsk', 'get'        // 房间入住要求查询
    );
    Route::rule(
        'AdminSysRoomManage/getHouseList', 'mtadminapi/AdminSysRoomManage/getHouseList', 'get'        // 获取房屋列表
    );
    Route::rule(
        'AdminSysRoomManage/getHouseInfo', 'mtadminapi/AdminSysRoomManage/getHouseInfo', 'get'        // 获取房屋详情
    );
    Route::rule(
        'AdminSysRoomManage/getHouseTypeList', 'mtadminapi/AdminSysRoomManage/getHouseTypeList', 'get'        // 获取房屋类型
    );
    Route::rule(
        'AdminSysRoomManage/houseDataSave', 'mtadminapi/AdminSysRoomManage/houseDataSave', 'post'        // 房屋详情修改
    );
    Route::rule(
        'AdminSysRoomManage/getBedTypeList', 'mtadminapi/AdminSysRoomManage/getBedTypeList', 'get'        // 获取床类型
    );
    Route::rule(
        'AdminSysMarkeManage/getBedTypeList', 'mtadminapi/AdminSysMarkeManage/saleToday', 'post'        // 房屋今日优惠添加
    );
    Route::rule(
        'AdminSysMarkeManage/getBedTypeList', 'mtadminapi/AdminSysMarkeManage/houseMarkeSave', 'post'        // 房屋今日优惠修改
    );
    Route::rule(
        'AdminSysAssessManage/assessList', 'mtadminapi/AdminSysAssessManage/assessList', 'get'        // 商家评论列表
    );
    Route::rule(
        'AdminSysAssessManage/replyAssess', 'mtadminapi/AdminSysAssessManage/replyAssess', 'post'        // 商家回复评论
    );
})->middleware(['ApiResponse',"MtAdminRequestToken"]);

Route::group('superadmin', function() { // 平台后台管理
    Route::rule(
        'AdminSysUserAdmin/adminUserAdd', 'mtsuperadmin/AdminSysUserAdmin/adminUserAdd', 'post'     // 管理员添加
    );
})->middleware(['ApiResponse',"MtAdminRequestToken"]);

Route::group('mtapi', function() { // 平台后台管理
    Route::rule(
        'Vip/openVip', 'api/Vip/openVip', 'get'     // 会员开通
    );
    Route::rule(
        'Vip/getVipClass', 'api/Vip/getVipClass', 'get'     // 获取会员类型
    );
    Route::rule(
        'Vip/getVipList', 'api/Vip/getVipList', 'get'     // 会员卡页滚动条
    );
    Route::rule(
        'HouseData/getHouseInfo', 'api/HouseData/getHouseInfo', 'get'     // 获取房间详情
    );
    Route::rule(
        'HouseData/getShopInfo', 'api/HouseData/getShopInfo', 'get'     // 获取商铺详情
    );
    Route::rule(
        'amount/amountList', 'api/amount/amountList', 'get'     // 获取商铺详情
    );
    Route::rule(
        'order/newlyAddedOrder', 'api/order/newlyAddedOrder', 'get'     // 获取商铺详情
    );
})->middleware(['ApiResponse','MtApiToken']);

Route::rule(
    'common/chinaArea', 'command/common/chinaArea', 'get'        // 地区列表
)->middleware('ApiResponse');



